#!/bin/bash

#mun_1=`./random 1 5`
#echo "$mun_1"
k=0
for ((i=0;i<5;i++))
do
	mun_1=`./random 1 5`
#	echo "$mun_1"
	echo "你每次有三次机会，请注意把握"
	for ((j=0;j<3;j++))
	do
		echo "请输入1-5之间的整数"
		read mun_2
		if [ $mun_1 -eq $mun_2 ];then
			echo "恭喜！你猜中了"
			k=$(($k+1))
			break;
		elif [ $mun_1 -lt $mun_2 ];then
			echo "大于目的数"
		else [ $mun_1 -gt $mun_2 ]
			echo "小于目的数"
		fi
	done

done
echo "你的本次得分为$k"
